import request from '@/utils/request'

export function getListPage(query) {
  return request({
    url: '/repair/KfkConsumerError/listErrorPage',
    method: 'GET',
    params: query
  })
}

// 数据导入的预处理记录
export function getErrorListRecord(query) {
  return request({
    url: '/repair/KfkConsumerError/listErrorPageDeal',
    method: 'GET',
    params: query
  })
}

export function getErrorList(query) {
  return request({
    url: '/repair/KfkConsumerError/listErrorPageByTypeAndCode',
    method: 'GET',
    params: query
  })
}

export function saveRule(data) {
  return request({
    url: '/repair/KfkConsumerError/savePreHandle',
    method: 'POST',
    data: data
  })
}

// 获取来源
// export function getResource(params) {
//   return request({
//     url: '/repair/KfkConsumerError/listPreHandle',
//     method: 'GET',
//     params: params
//   })
// }

// 重新校验
export function reVerify(params) {
  return request({
    url: '/repair/KfkConsumerError/handleError',
    method: 'GET',
    params: params
  })
}

// 查询异常类型列表
export function getErrorType(params) {
  return request({
    url: '/repair/KfkConsumerError/listErrorType',
    method: 'GET',
    params: params
  })
}

// 查询预处理业务分类树
export function getListBizTypeTree(params) {
  return request({
    url: '/repair/KfkConsumerError/listBizTypeTreePreHandle',
    method: 'GET',
    params: params
  })
}

// 查询工区
export function getworkAreaList(params) {
  return request({
    url: '/sysm/dept/workAreaList',
    method: 'GET',
    params: params
  })
}
